The present invention relates to an error correction apparatus, and more particularly, to an error correction apparatus for calculating the syndrome of the data stored in a buffer memory, which includes a random access memory, to correct errors.
FIGS. 1(a) to 1(d) illustrate the data format of a compact disc ROM (CD-ROM) As shown in FIG. 1(a), CD-ROM data is formed from multiple sectors, each of which has 2352 bytes. Each sector includes 12 bytes of synchronizing data, 4 bytes of a header, 2048 bytes of user data, 4 bytes of error detection code (EDC) data, 8 bytes of ZERO data, and 276 bytes of error correction code (ECC) data.
The data excluding the 12 bytes of synchronizing data undergoes error correction with an ECC. When the error correction is performed, the 2340 bytes of data, which do not include the synchronizing data, are alternately divided into LS bytes and MS bytes. This generates data including 1170 LS bytes (FIG. 1(c)) and 1170 MS bytes (FIG. 1(d)). Further, referring to FIG. 2, the 1170 LS bytes and the 1170 MS bytes are coded in two directions, a P sequence (P group) direction and a Q sequence (Q group) direction.
For the first 1032 bytes of data, a F parity, which consists of 2 bytes of data, is added to every 24 bytes of data in the P sequence direction. Further, 43 code words (P codes), which are coded in the P sequence direction, are configured. As apparent from FIG. 2, the position of the jth symbol for the ith code word of the P codes is represented by “i+43j (i=0, 1, . . . 42: j=0, 1, . . . 25).
For the first 1032 bytes of data and the 86 bytes of P parities (2 bytes×43), a Q-parity, which consists of 2 bytes of data, is added to every 43 bytes of data. Further, 26 code words (Q words), which are coded in the Q sequence direction, are configured. The position of the jth symbol for the ith code word of the Q codes is represented by “43i|44j” mod (remainder) 1118 (i=0, 1, . . . 25: J=0, 1, . . . 42).
The symbols configuring the P codes and the Q codes are read from a memory to calculate a syndrome and determine whether the data includes errors. The detection of errors using the code words is performed as described below.
A compact disc (CD) signal processing circuit performs a decoding process, such as error correction, on the data read from a CD-ROM in the same manner as CD audio. The processed data is stored as the CD-ROM data of FIG. 1(a) in a dynamic random access memory (DRAM), which is a buffer memory. FIG. 3 illustrates the CD-ROM data stored in the DRAM.
More specifically, with regard to the CD-ROM sector data of FIG. 1(a), the 1176 bytes of data (6 bytes of data in the 12 bytes of synchronizing data and the 1170 LS bytes or MS bytes) are written along the addresses of the DRAM. FIG. 3 shows an example in which column addresses have 256 bytes. A row address is incremented in cycles of 256 bytes. The MS byLes arid LS bytes are actually written along each address in units of two bytes in the DRAM. The memory cells of the same row are connected to the same word line in the DRAM.
The writing of data is basically performed in accordance with the order of a data stream when the CD-ROM data is transferred (i.e., the data stream of the CD-ROM data of FIG. 1(a)). However, the data is actually divided into 1170 LS bytes and 1170 MS bytes. Thus, the 6 bytes of synchronizing data and the data of FIGS. 1(c) and 1(d) are written to the memory cells starting from lower addresses. For example, referring to FIG. 3, in row 0 of sector 1, the synchronizing data is written in column 1 to column 5. Data 0 of FIGS. 1(c) and 1(d) is written to row 0 column 6. Data 1 of FIGS. 1(c) and 1(d) is written to row 0 column 7.
The CD-ROM data of each sector is read from the DRAM in units of code words. As an example, the reading order of the P codes will now be discussed. As shown in FIG. 4, the CD-ROM data is read in code word units of 26 bytes. The symbols forming the read code words are used to calculate the syndrome. The syndrome is set so that it has a predetermined value when each piece of data (code word) does not include an error. Thus, the calculation of the syndrome enables determination of whether a code word includes an error.
When it is determined that the code word includes an error, the value of the error and the location of the error are obtained based on the syndrome. Then, data is read again from the location including an error. An exclusive OR operation is performed with the read data and the value of the error to generate correct data. The erroneous data is then rewritten by the correct data.
After the error correction, the EDC data of FIG. 1(a) is used to check whether the error correction was performed properly. The data that has undergone the error correction process and the check for erroneous corrections is transferred from the DRAM to the host computer.
In this manner, the code words are used to perform error correction. However, the symbols are stored in the memory cell of the DRAM at non-consecutive addresses. Thus, the time for accessing the memory cell becomes long when reading the code words. More specifically, to read a symbol from the DRAM, three operations, which include precharge, row address designation, and column address designations are necessary. Thus, three clock signals must be provided each time a symbol is read. This hinders with increasing the speed of the error correction process. Such problem occurs in an error correction apparatus that stores data temporarily in a buffer memory and then sequentially reads symbols while performing error detection or error correction.